Conversation
|
Thanks for the pull request, @Agrendalath! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. 🔘 Update the status of your PRYour PR is currently marked as a draft. After completing the steps above, update its status by clicking "Ready for Review", or removing "WIP" from the title, as appropriate. Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
|
@ormsbee, @bradenmacdonald, I pushed the base models for Pathways, steps, and enrollments to check whether this is how we would like to store them in the Learning Core. I'm not very familiar with this repository, so for now this is just a draft to confirm the direction. The assumption is that a Pathway is not publishable and has no runs. We may need to check this part with the product WG later. |
3663d2b to
e4451b6
Compare
| context_key = LearningContextKeyField( | ||
| max_length=255, help_text=_("Opaque key of the learning context (e.g. 'course-v1:OpenedX+DemoX+DemoCourse').") | ||
| ) |
There was a problem hiding this comment.
Once #479 is ready, we can replace this with a ForeignKey to either CatalogCourse or CourseRun (depending on the outcome of the discussion about courses vs runs.
| # TODO: Create receivers to automatically create audit records. | ||
| class PathwayEnrollmentAudit(models.Model): |
There was a problem hiding this comment.
Could we just use django-simple-history like many other parts of the platform do? Or do we really need to track these state transitions carefully?
from simple_history.models import HistoricalRecords
...
# Keep track of the history of this table:
history = HistoricalRecords()
There was a problem hiding this comment.
@bradenmacdonald, when we auto-enroll a learner after they create an account, we want to update the existing audit record with the enrollment, which ensures record consistency. It also allows checking bulk enrollments directly in Django admin and providing a readable history with a simple inline for each enrollment.
There was a problem hiding this comment.
OK. In that case, I'm wondering if we'll want to find a way to have some common code/models/tables for managing enrollments, as it seems like the *Enrollment, *EnrollmentAllowed, *EnrollmentAudit, models and logic may be very similar for both courses and pathways, and perhaps other things in the future. Doesn't have to happen now though, as it's probably more trouble than it's worth.
There was a problem hiding this comment.
@bradenmacdonald, we ported some logic from openedx-platform, so it should be possible to introduce a reusable approach at some point, but moving course enrollments away from openedx-platform (even partially) would be a significant task, as there are some edge cases to consider/deprecate (like processing the refunds for the verified enrollment track, which is also tied to the certificates API).
| "PathwayEnrollment", | ||
| "PathwayEnrollmentAllowed", | ||
| "PathwayEnrollmentAudit", |
There was a problem hiding this comment.
It may make sense for Pathway and PathwayStep to be part of openedx_content, but I think enrollment-related models definitely belong somewhere else.
It might make sense to put Pathway and Pathway step into the new openedx_catalog app (#479), and enrollment into a new app (openedx_learning?)
There was a problem hiding this comment.
@bradenmacdonald, should we create openedx_learning as a sibling to openedx_content or extract this to a separate repository? This is another case that would require access to the opendx-platform API, because it handles enrolling users in courses. In the Learning Paths plugin, we do this way.
There was a problem hiding this comment.
We'll have to discuss this as I'm not sure. Putting it in a completely separate repo is an easy way to solve the problem of "openedx-core shouldn't import from platform"
There was a problem hiding this comment.
@bradenmacdonald, we could do the following:
- Keep pathway models as-is.
- Move enrollment models to
openedx_learning. - Add models for pathway and step criteria, with CEL support (I have a local draft for this that I wrap up and push next week).
- Add APIs for these models.
- Fork the learning-paths-plugin repo into
openedx-pathwaysand remove everything other than Open edX interactions (via thecompatlayer), REST APIs, and the user post_save signal receiver there. This repo would interact withopenedx-corevia the new Python APIs, and would not use the models directly. - Add progress calculations to
openedx-pathways.
opendx-platform may not need to use anything from openedx-core for the pathways; it would only install openedx-pathways, which would provide all the logic to the MFEs via REST APIs.
Please let me know if you have a different architecture in mind for openedx-core. Once we add APIs for grading and enrollments, we could move things from openedx-pathways to openedx_learning. However, what can we do right now to move this one forward?
There was a problem hiding this comment.
@Agrendalath That seems reasonable to me! But I'd really like input from @ormsbee and @kdmccormick .
This is the initial implementation of Pathways.
Private-ref: BB-10364